package aer.CuantosNumerosReversibles;

public class CuantosNumerosReversibles {
	//private static boolean permiteCero;

	public static void main(String[] args) throws Exception {
		long longitud = readInt();

		while (longitud != 0) {

			if (restriccion(longitud)) {
				System.out.print("0\n");
			} else {
				calcular(longitud);
			}

			longitud = readInt();
		}

	}

	private static void calcular(long longitud) {
		long sol = 0;
		long mitad = longitud / 2;

		if ((longitud & 1) == 0) { // par
			//permiteCero = false;
			for (int k = 0; k < mitad; k++) {
				if (k == 0) {
					//sol = contar(false, false);
					sol = 20;
				} else {
					//sol *= contar(false, false);
					sol *= 30;
				}
				//permiteCero = true;
			}
		} else { // impar
			//permiteCero = true;
			mitad++;
			for (long k = 0; k < mitad; k++) {

				if (k == mitad - 1) {
					//permiteCero = false;
				}

				if (k == 0) {
					//sol = contarCentral();
					sol = 5;
				} else if ((k & 1) == 1) {
					//sol *= contar(true, false);
					sol *= 20;
				} else {
					//sol *= contar(false, true);
					sol *= 25;
				}
			}

		}

		System.out.print(sol+"\n");

	}
/*
	private static long contar(boolean daAcarreo, boolean reciveAcarreo) {
		long acc = 0;

		if (permiteCero) {
			for (int i = 0; i < 10; i++) {
				for (int j = 0; j < 10; j++) {
					int n = i + j;

					if (reciveAcarreo) {
						n++;
					}

					if (daAcarreo) {
						if (n >= 10 && (n & 1) == 1) {
							acc++;
						}
					} else {
						if (n < 10 && (n & 1) == 1) {
							acc++;
						}
					}

				}
			}
		} else {
			for (int i = 1; i < 10; i++) {
				for (int j = 1; j < 10; j++) {
					int n = i + j;

					if (reciveAcarreo) {
						n++;
					}

					if (daAcarreo) {
						if (n >= 10 && (n & 1) == 1) {
							acc++;
						}
					} else {
						if (n < 10 && (n & 1) == 1) {
							acc++;
						}
					}

				}
			}
		}

		return acc;
	}
	
	private static long contarCentral() {
		long acc = 0;

		for (int i = 0; i < 10; i++) {
			long n = i * 2;
			n++;
			if (n < 10 && n % 2 == 1) { // optimizar
				acc++;
			}
		}

		return acc;
	}
*/
	private static boolean restriccion(long longitud) {
		if ((longitud & 1) == 0) {
			return false;
		}
		boolean b = true;

		for (int ri = 1; ri < longitud; ri += 2) {
			if (b) {
				b = false;
			} else {
				b = true;
			}
		}

		return b;
	}

	private static char x;
	private static StringBuilder sb = new StringBuilder("");

	private static int readInt() throws Exception {
		sb.delete(0, (sb.length()));

		do {
			x = (char) System.in.read();
			if (x >= '0' && x <= '9') {
				sb.append(x);
			} else if (x == 13) {
				System.in.read();
			} else {
				break;
			}

		} while (x != 13 && x != 10 && x != ' ');

		try {
			return Integer.parseInt(sb.toString());
		} catch (Exception e) {
			return readInt();
		}
	}

}